package fr.umlv.ig.event;

import fr.umlv.ig.model.Line;

/**
 * Represents event concerned a line.
 * @author jenseric
 * @author william
 *
 */
@SuppressWarnings("serial")
public class LineEvent extends EventObjectWithType {
	
	/**
	 *	event : line is added.
	 */
	public static final int LINE_ADDED = 1;
	
	/**
	 *	event : line is selected.
	 */
	public static final int LINE_SELECTED = 2;
	
	/**
	 *	event : line is unselected.
	 */
	public static final int LINE_UNSELECTED = 3;

	/**
	 * Initializes a LineEvent
	 * @param line the line concerned by the event.
	 * @param eventType the type of the event.
	 */
	public LineEvent(Line line, int eventType) {
		super(line, eventType);
		if(eventType != LINE_ADDED && eventType != LINE_SELECTED
				&& eventType != LINE_UNSELECTED) {
			throw new IllegalArgumentException("Bad LineEvent type: "+eventType);
		}
	}
	

}
